APE Cram
cs.jdoner.me · file i/o File Reader
Truth 1 Each module is independent. A compile error in one does not affect the others.
Truth 2 A method that does half the job and compiles beats a method that does the whole job and does not.
{{ pz.rung }}

{{ pz.title }}

Summer26 APE

{{ pz.brief }}

Goal {{ pz.goalText }}
Scores 0 {{ pz.zeroTrap }}
Then: guided walkthrough
{{ fileP.name }} {{ fileP.tag }}
no such file

{{ fileP.name }} is not on disk. openInputFile returns false and records why in errorMsg.

no file opened

The name itself is rejected before any file is touched.

{{ r.n }} (blank line) {{ r.lead }}{{ r.text }}{{ r.trail }}
a tab, · a trailing space. The Scanner skips all whitespace.
Tester Main run it, then diff
{{ c.n }} {{ c.text }}
{{ expectedComment }} // expected output is a comment here on the real exam. Predict it, then Run to reveal and diff.
Reveal speed
predicted {{ ctl.predicted }} attempts {{ ctl.attempts }}
Output tiles, tap to add, drag to place
{{ b.text }} +
Your predicted output one tile per printed line, in order
Tap or drag the output tiles here, in the order you think main prints them. Predict before you Run.
{{ b.n }} {{ b.text }} {{ b.glyph }} {{ b.matchText }}
{{ dragLabel }}
{{ hint.head }}

{{ hint.body }}

Matched the comment

{{ draw.why }}

{{ draw.text }}

On the APE, every tester Main ends with its expected output as a comment. You just ran it, then diffed your prediction against that comment. That is the whole workflow.